package cn.zh.stan.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import java.util.ArrayList;

import cn.zh.stan.ITem.GooodItem;
import cn.zh.stan.R;

/**
 * Created by WYN on 2018/2/13 0013.
 */

public class GAdapter extends BaseAdapter{
    Context context;
    ArrayList<GooodItem> arrayList;
    LayoutInflater inflater;
    public GAdapter(Context context,ArrayList<GooodItem> arrayList){
        this.context=context;
        this.arrayList=arrayList;
        inflater=LayoutInflater.from(context);
      }


    @Override
    public int getCount() {
        return arrayList.size();
    }

    @Override
    public Object getItem(int i) {
        return arrayList.get(i);
    }

    @Override
    public long getItemId(int i) {
        return i;
      }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        Holder holder=null;
        if (null==view){
            view=inflater.inflate(R.layout.ga_layout,null,false);
            holder=new Holder();
            view.setTag(holder);
          }else {
            holder= (Holder) view.getTag();
          }



        return view;
    }


    class Holder{



    }


}
